<!DOCTYPE html>

<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>原点(基点)</title>

    <style type="text/css">
        .wrapper {
            width: 80%;
            border: 1px solid blue;
        }
        
        .wrapper>span {
            display: inline-block;
            height: 100px;
            width: 100px;
            border: 1px solid blue;
            margin: 25px;
            text-align: center;
            line-height: 100px;
            transition: transform 500ms;
        }
        
        .wrapper>span:nth-child(odd) {
            background: #dedede;
        }
        
        .wrapper>span:nth-child(even) {
            background: #ffff00;
        }
        
        .first span:nth-child(1) {
            transform-origin: center center;
        }
        
        .first span:nth-child(1):hover {
            transform: rotate(45deg);
        }
        
        .first span:nth-child(2) {
            transform-origin: 50% 50%;
        }
        
        .first span:nth-child(2):hover {
            transform: rotate(45deg);
        }
        
        .first span:nth-child(3) {
            transform-origin: left top;
        }
        
        .first span:nth-child(3):hover {
            transform: rotate(45deg);
        }
        
        .first span:nth-child(4) {
            transform-origin: 80px 80px;
        }
        
        .first span:nth-child(4):hover {
            transform: rotate(45deg);
        }
        
        .second span:nth-child(1) {
            transform-origin: center center;
        }
        
        .second span:nth-child(1):hover {
            transform: scale(1.25);
        }
        
        .second span:nth-child(2) {
            transform-origin: left top;
        }
        
        .second span:nth-child(2):hover {
            transform: scale(1.25);
        }
        
        .second span:nth-child(3) {
            transform-origin: center top;
        }
        
        .second span:nth-child(3):hover {
            transform: scale(1.25);
        }
        
        .second span:nth-child(4) {
            transform-origin: left center;
        }
        
        .second span:nth-child(4):hover {
            transform: scale(.75);
        }
    </style>

</head>

<body>

    <div class="wrapper first">
        <span>1</span>
        <span>2</span>
        <span>3</span>
        <span>4</span>
    </div>

    <div class="wrapper second">
        <span>1</span>
        <span>2</span>
        <span>3</span>
        <span>4</span>
    </div>

</body>

</html>